/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package assisisw.smartcal.entitysubsystem;

/**
 *
 * @author Francesco
 */
public enum Visibility 
{

    /***/
    PUBLIC ,
    
    /***/
    PRIVATE ;
    
    /***/
    public static Visibility fromString ( String s ) 
    {
        Visibility res ;
        if ( s != null  )
            switch ( s.toLowerCase() )
            {
                case "public" :
                    res = PUBLIC ;
                break ;
                case "private" :
                    res = PRIVATE ;
                break ;
                default :
                    throw new IllegalArgumentException () ;
            }
        else
            throw new IllegalArgumentException () ;
        return res ;
    }
    
}
